$import( "SmitearWebGL.Objects.Parser.Collada.DaeEntity" );

SmitearWebGL.Objects.Parser.Collada.DaeSampler2D = SmitearWebGL.Objects.Parser.Collada.DaeEntity.extend(
{
	/******** constructor ********/

	init : function( document, node )
	{
		this.source = "";
		this.wrap_s = "";
		this.wrap_t = "";
		this.minfilter = "";
		this.magfilter = "";
		this.mipfilter = "";

		this._super( document, node );
		this._registClass( "SmitearWebGL.Objects.Parser.Collada.DaeSampler2D" );
	}
	,
	read : function( node )
	{
		$THROW( node.localName == SmitearWebGL.Objects.Parser.Collada.Const.DAE_FXCMN_SAMPLER2D_ELEMENT,
		"expected a '" + SmitearWebGL.Objects.Parser.Collada.Const.DAE_FXCMN_SAMPLER2D_ELEMENT + "' element" );

		this._super( node );

		this.source = this.getNodeContent( this.getNode( node, SmitearWebGL.Objects.Parser.Collada.Const.DAE_SOURCE_ELEMENT ) );
		this.wrap_s = this.getNodeContent( this.getNode( node, SmitearWebGL.Objects.Parser.Collada.Const.DAE_SAMPLER2D_WARPS ) );
		this.wrap_t = this.getNodeContent( this.getNode( node, SmitearWebGL.Objects.Parser.Collada.Const.DAE_SAMPLER2D_WARPT ) );
		this.minfilter = this.getNodeContent( this.getNode( node, SmitearWebGL.Objects.Parser.Collada.Const.DAE_SAMPLER2D_MINFILTER ) );
		this.magfilter = this.getNodeContent( this.getNode( node, SmitearWebGL.Objects.Parser.Collada.Const.DAE_SAMPLER2D_MAGFILTER ) );
		this.mipfilter = this.getNodeContent( this.getNode( node, SmitearWebGL.Objects.Parser.Collada.Const.DAE_SAMPLER2D_MIPFILTER ) );
			
		$LOG( " => => sampler2D source: " + this.source );
	}
}
);